﻿/*********************************************************************************/
/**    Sims3Pack Readme Generator                                               **/
/**    Copyright (C) 2012  Anja Knackstedt                                      **/
/**                                                                             **/
/**    This program is free software: you can redistribute it and/or modify     **/
/**    it under the terms of the GNU General Public License as published by     **/
/**    the Free Software Foundation, either version 3 of the License, or        **/
/**    (at your option) any later version.                                      **/
/**                                                                             **/
/**    This program is distributed in the hope that it will be useful,          **/
/**    but WITHOUT ANY WARRANTY; without even the implied warranty of           **/
/**    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            **/
/**    GNU General Public License for more details.                             **/
/**                                                                             **/
/**    You should have received a copy of the GNU General Public License        **/
/**    along with this program.  If not, see <http://www.gnu.org/licenses/>.    **/
/**                                                                             **/
/*********************************************************************************/




namespace Sims3PackReadmeGenerator
{
    /// <summary>
    /// represents option settings
    /// </summary>
    public class Options
    {
        //ToDo support for gui language

        #region properties

        public string StoreInfoPath { get; set; }
        public bool IsResolveStoreInfo { get; set; }
        public Languages GuiLanguage { get; set; }

        #endregion

        #region constructor

        /// <summary>
        /// initialize
        /// read values from user settings
        /// </summary>
        public Options()        {
           
            this.StoreInfoPath = Properties.Settings.Default.S3SBrowserPath;
            this.IsResolveStoreInfo = Properties.Settings.Default.UseS3SBrowserData;
        }

       /// <summary>
       /// initialize with options object
       /// </summary>
       /// <param name="opt">object to initialize new object with</param>
        public Options(Options opt)
        {          
            this.StoreInfoPath = opt.StoreInfoPath;
            this.IsResolveStoreInfo = opt.IsResolveStoreInfo;
        }

        #endregion

        #region methods

        /// <summary>
        /// save options to user properties
        /// </summary>
        public void save()
        {
            Properties.Settings.Default.S3SBrowserPath      = this.StoreInfoPath;
            Properties.Settings.Default.UseS3SBrowserData   = this.IsResolveStoreInfo;
        }

        #endregion
    }
}
